<%@ page language="java" 
	contentType="text/html; 
	charset=UTF-8"
	pageEncoding="UTF-8"
	import="connectMysql.TestConnect"
	%>
<!DOCTYPE html> 
<html>
	<head>
		<meta charset="UTF-8">
		<title>创建班级</title>
	</head>
	<body>
		<%
    	String teacher_id=request.getParameter("id");
		String lesson_name=new String(request.getParameter("class-name").getBytes("ISO-8859-1"), "UTF-8");
		String code=request.getParameter("invite-code");
		String message="对不起您没有权限，创建失败！";
		boolean res=connectMysql.TestConnect.init_class(lesson_name, teacher_id,code);
		if(res)
			message="创建成功！";
    	%>
	
	<script >
		alert("<%= message%>");
		window.location = "main.jsp?id=<%=teacher_id%>";
	</script>
	</body>
</html>